export ARCH := riscv64
export CC := $(ARCH)-linux-gnu-gcc
export LD := $(ARCH)-linux-gnu-ld
export CWD := $(shell pwd)
export GLOBAL_CFLAGS := -static -nostdinc -nostdlib -fno-builtin -fno-stack-protector -g -O0 -march=rv64gc -mabi=lp64d -I$(CWD)/aelibc/include -I/home/dly/naos/kernel/src/arch/riscv64/syscall

all:
	$(MAKE) -C aelibc
	$(MAKE) -C init

.PHONY: clean
clean:
	$(MAKE) -C aelibc clean
	$(MAKE) -C init clean

.PHONY: distclean
distclean: clean
	rm -rf $(CWD)/obj
